<!--
*Author：富行天下团队
 *
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/Mall_attributes.js此处编写
 -->
<template>
    <div>
        <view-grid
                   ref="grid"
                   :columns="columns"
                   :detail="detail"
                   :editFormFields="editFormFields"
                   :editFormFileds="editFormFields"
                   :editFormOptions="editFormOptions"
                   :searchFormFields="searchFormFields"
                   :searchFormFileds="searchFormFields"
                   :searchFormOptions="searchFormOptions"
                   :table="table"
                   :extend="extend">
        </view-grid>
    </div>
</template>

<script>
    import extend from "@/extension/mall/Mall_attributes.js";
    import ViewGrid from "@/components/basic/ViewGrid.vue";
    var vueParam = {
        components: {
            ViewGrid
        },
        data() {
            return {
                table: {
                    key: 'attributesID',
                    footer: "Foots",
                    cnName: '属性配置',  
                    name: 'Mall_attributes',
                    url: "/attributes/",
                    sortName: "createDate"
                },
                extend: extend,
                editFormFields:  {"attributesCode":"","attributesName":"","attributesType":"","attributeValue":"","roleId":"","isAvailable":"","isShow":"","attributeGroup":"","modifyID":"","createID":"","modifier":"","creator":"","modifyDate":"","createDate":"","merchantCode":"","merchantName":""},
                editFormOptions: [ 
                                 [{"title":"属性名称","required":true,"field":"attributesName","type":"text","colSize":4},
                                  {"title":"类型","required":true,"field":"attributesType","type":"select","dataKey":"mall_type","colSize":4},
                                  {"title":"组号","required":true,"field":"attributeGroup","type":"number","colSize":4},
                                  {"title":"属性编码","field":"attributesCode","type":"text",hidden:true}],
                                 [{"title":"是否展示","required":true,"field":"isShow","type":"switch",hidden:true},
                                  {"title":"属性值","field":"attributeValue","type":"checkbox","dataKey":"week_type","colSize": 8,hidden:true}]],
                searchFormFields: {"attributesName":"","attributesType":"","isAvailable":"","creator":""},
                searchFormOptions: [[{"title":"属性名称","field":"attributesName","type":"like"},{"title":"类型","field":"attributesType","type":"select","dataKey":"mall_type"},{"title":"组号","field":"attributeGroup","type":"number"}]],
                columns: [
                        {field:'attributesID',title:'主键',type:'int',width:120,hidden:true,readonly:true,require:true,align:'left'},
                       // {field:'attributesCode',title:'属性编码',type:'string',width:220,align:'left',sortable:true},
                        {field:'attributesName',title:'属性名称',type:'string',width:100,align:'left',sortable:true},
                        {field:'attributeValue',title:'属性值',bind: { key: 'week_type', data: [] },type:'string',width:240,align:'left'},
                        {field:'attributesType',title:'类型',bind: { key: 'mall_type', data: [] },type:'int',width:100,align:'left'},
                        {field:'attributeGroup',title:'组号',type:'number',width:100,align:'left',sortable:true},
                        {field:'isAvailable',title:'是否可用',bind: { key: 'enable', data: [] },type:'int',width:100,align:'left',hidden:true},
                        {field:'isShow',title:'是否展示',bind: { key: 'enable', data: [] },type:'int',width:100,align:'left',hidden:true},
                        {field:'modifier',title:'修改人',type:'string',width:100,align:'left'},
                        {field:'modifyDate',title:'修改时间',type:'datetime',width:160,align:'left',sortable:true},
                        {field:'creator',title:'创建人',type:'string',width:100,align:'left'},
                        {field:'createDate',title:'创建时间',type:'datetime',width:160,align:'left',sortable:true},
                       ],
                hasDetail: false,
                detail: {
                    isDetail: false,
                    isDetails: false,
                    cnName:"日历",
                    columns: [{field:'id',title:'主键',type:'int',width:90,hidden:true,readonly:true,require:true,align:'left'},
                    //    {field:'attributesID',title:'属性ID',type:'int',width:90,align:'left',sortable:true},
                    //    {field:'dateStartTime',title:'日期开始时间',type:'datetime',edit:{type:'datetime'},width:120,align:'left',sortable:true},
                    //    {field:'dateEndTime',title:'日期结束时间',type:'datetime',edit:{type:'datetime'},width:120,align:'left',sortable:true},
                          {field:'timeContainer',title:'日期起止时间',type:'datetimerange',edit:{type:'datetimerange'},width:300,align:'left',sortable:true},
                    //    {field:'modifier',title:'修改人',type:'string',width:180,align:'left'},
                    //    {field:'creator',title:'创建人',type:'string',width:180,align:'left'}
                    ],
                    sortName: "id",
                    key:"id"
                }
            };
        }
    };
    export default vueParam;
</script>
